package com.lizhen.structurepattern.decoratorpattern;

import com.lizhen.structurepattern.decoratorpattern.impl.Circle;
import com.lizhen.structurepattern.decoratorpattern.impl.Rectangle;

public class DecoratorPattern {
    public DecoratorPattern() {
    }

    public static void main(String[] args) {
        Shape circle = new Circle();
        Shape redCircle = new RedShapeDecorator(new Circle());
        Shape redRectangle = new RedShapeDecorator(new Rectangle());
        System.out.println("Circle with normal border");
        circle.draw();
        System.out.println();
        System.out.println("Circle of red border");
        redCircle.draw();
        System.out.println();
        System.out.println("Rectangle of red border");
        redRectangle.draw();
    }
}
